from itertools import repeat
from matplotlib import animation
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from matplotlib.transforms import Transform

columns = ['date', 'China', 'us', 'yd']
datas = [[ 327, 385.00, 189.00, 589.00],
        [328, 333.00, 200.00, 789.00],
        [333, 1.00, 100.00, 11.00]]

#fig = plt.figure()
fig, ax = plt.subplots()

def update(row):

    ax.clear()

    ax.barh(columns[1:], row[1:])

    ax.text(0.8, 0.5, row[0], transform=ax.transAxes, fontsize=20)

animation = FuncAnimation(fig, update, frames=datas, repeat=False)

plt.show()
